public class NewGuessNumber {
    int[] answers = new int[4];

    public int [] generateAnswers(){
        answers[0]=(int)(Math.random()*10);
        answers[1]=(int)(Math.random()*10);
        answers[2]=(int)(Math.random()*10);
        answers[3]=(int)(Math.random()*10);
        return answers;
    }

    public static void main(String[] args){
        NewGuessNumber ngn =new NewGuessNumber();
        int[] answers = ngn.generateAnswers();
        for (int i = 0;i < answers.length;i++){
            System.out.println(answers[i]);
        }
    }
}